package Java8实战._3_Stream_用流收集数据;


public class Dish {

    private final String name;
    private final boolean vegetarian;
    private final int calories;
    private final Type type;
    private CaloricLevel caloricLevel;

    public Dish(String name, boolean vegetarian, int calories, Type type) {
        this.name = name;
        this.vegetarian = vegetarian;
        this.calories = calories;
        this.type = type;
    }

    public Dish(String name, boolean vegetarian, int calories, Type type, CaloricLevel caloricLevel) {
        this.name = name;
        this.vegetarian = vegetarian;
        this.calories = calories;
        this.type = type;
        this.caloricLevel = caloricLevel;
    }

    public String getName() {
        return name;
    }

    public boolean isVegetarian() {
        return vegetarian;
    }

    public int getCalories() {
        return calories;
    }

    public Type getType() {
        return type;
    }

    public enum Type{MEAT,FISH,OTHER}

    public enum CaloricLevel{DIET,NORMAL,FAT};

//    @Override
//    public String toString() {
//        return "Dish{" +
//                "name='" + name + '\'' +
//                ", vegetarian=" + vegetarian +
//                ", calories=" + calories +
//                ", type=" + type +
//                ", caloricLevel=" + caloricLevel +
//                '}';
//    }

    public String toString(){
        return name;
    }
}
